﻿@model dynamic
@using Orchard.Security;
@using Orchard.DisplayManagement.Descriptors;
@using Orchard.UI.Resources;
@using Orchard;
@using Orchard.ContentManagement;
@using System.Web.Mvc;
@using Orchard.Messaging.Services;
@using VIC.User.Models;
@using System.Linq;
@{
    SetMeta("X-UA-Compatible", "IE=edge,chrome=1");
    Style.Include("site1.css");
    Style.Include("Menu.css");
    Style.Include("Table.css");
    Style.Include("ie.css").UseCondition("gte IE 9").SetAttribute("media", "screen, projection");
    Style.Include("ie8.css").UseCondition("IE 8").SetAttribute("media", "screen, projection");
    Style.Include("ie7.css").UseCondition("lte IE 7").SetAttribute("media", "screen, projection");
    Script.Require("jQuery");
    Script.Require("ShapesBase");
    Script.Include("admin.js");
    //Script.Include("jquery-1.7.2.min.js");
    Script.Include("jquery-ui-1.9.1.custom.js");
    Script.Include("modernizr-2.5.3.js");
    Script.Include("Menu.js");
    Script.Include("jquery.validate.min.js");
    Script.Include("jquery.validate.unobtrusive.min.js");

    /* Some useful shortcuts or settings
    ***************************************************************/

    Func<dynamic, dynamic> Zone = x => Display(x); // Zone as an alias for Display to help make it obvious when we're displaying zones

    /* Inserting some ad hoc shapes
    ***************************************************************/

    //these are just hacked together to fire existing partials... can change
    Model.Header.Add(Display.Header());

    //Model.Header.Add(Display.User(CurrentUser: WorkContext.CurrentUser));
    //Model.Footer.Add(Display.OrchardVersion());

    if (Model.Title != null)
    {
        Model.Header.Add(Display.Title(Title: Model.Title));
    }
}
@*<p>@abc.Count()</p>*@
<div id="layout-content">
    @if (Model.Header != null)
    {
        <div id="header" role="banner">
            <a href="~/" >
                <div id="logo">
                </div>
            </a>
            <nav>
                <ul id="jsddm">
                @*@if (WorkContext.CurrentUser == null)
                {
                    <li>
			           @Html.ActionLink("Hành động ngay!", "LogOn", new { Controller = "Account", Area = "VIC.User", ReturnUrl = Context.Request.RawUrl })
		            </li>
                }
                else*@
                
		            <li>
			            @Html.ActionLink("Hành động ngay!", "CreateStory", new { Controller = "Story", Area = "VIC_Story" })
		            </li>
                
                    <li>
			            @Html.ActionLink("Kho câu chuyện", "Storywarehouse", new { Controller = "Story", Area = "VIC_Story" })
		            </li>
		            <li style="position:relative;">
			            <a style="padding:16px 10px; width: 120px;" href="#">Thông tin</a>
                            <ul style="right:0px; left:0px;">
                                <li>
                                    @Html.ActionLink("Về Vietnamicare", "", "")
                                </li>
                                <li>
                                    @Html.ActionLink("Đội ngũ", "", "")
                                </li>
                                <li>
                                    @Html.ActionLink("Hướng dẫn", "", "")
                                </li>
                                <li>
                                    @Html.ActionLink("Blog", "", "")
                                </li>
                                <li>
                                    @Html.ActionLink("Đội ngũ", "", "")
                                </li>
                            </ul>
		            </li>
                    <li>
                   <input type="text" class="txtSearch" placeholder="Tìm kiếm" style="font-style: italic; font-size: 13px;" />
                   </li>
                    <li style="position:relative;">
                    @if (Request.IsAuthenticated)
                    {
                        int id = 0;
                        var abc = WorkContext.Resolve<IOrchardServices>().ContentManager.Query<VIC_UserPart, VIC_UserRecord>().Where(v => v.UserRecord_Id == WorkContext.CurrentUser.Id).List();
                        foreach (var i in abc)
                        {
                            id = i.Id;
                        }
                    <a style="padding:16px 10px; width: 120px;" href="#"> @User.Identity.Name</a>
                            <ul style="right:0px; left:0px;">
                                <li>
                                    @Html.ActionLink("Chuyện của tôi", "MyStory", new { Controller = "Story", Area = "VIC_Story" })
                                </li>
                                <li>
                                    @Html.ActionLink("Profile", "ViewUser", new { Controller = "Account", Area = "VIC.User", id = @id })
                                </li>
                                @if (AuthorizedFor(Orchard.Security.StandardPermissions.AccessAdminPanel))
                                {
                                    <li>
                @Html.ActionLink("Quản lý".ToString(), "Index", new { Area = "Dashboard", Controller = "Admin" })
                </li>
                                }
                                <li>
                                    @Html.ActionLink("Thoát", "LogOff",new { Controller = "Account", Area = "Orchard.Users", ReturnUrl = Context.Request.RawUrl }, new { rel = "nofollow" })
                                </li>
                            </ul>
                    }
                    else
                    {
                                    @Html.ActionLink("Đăng nhập", "LogOn", new { Controller = "Account", Area = "VIC.User", ReturnUrl = Context.Request.RawUrl })
                                    <li>
			            @Html.ActionLink("Đăng ký", "Register", new { Controller = "Account", Area = "VIC.User" })
                        </li>
                    }
		            </li>
	            </ul>
            </nav>
            @*  @Zone(Model.Header)*@
        </div>
    }
@*<div id="navshortcut">
        <a href="#Menu-admin">
            @T("Skip to navigation")
        </a>
    </div>*@
    <div id="layout-main">
        @*<div id="main" role="main">*@ @*@if (Model.Messages != null)
        {
            <div id="messages">
                @Zone(Model.Messages)
            </div>
        }*@
        @if (Model.BeforeContent != null)
        {
            <div id="before-content">
                @Zone(Model.BeforeContent)
            </div>
        }
        @if (Model.LocalNavigation != null)
        {
            <div id="local-navigation">
                @Zone(Model.LocalNavigation)
            </div>
        }
        @if (Model.Content != null)
        {
@*<div id="content" class="group">*@
            
            <div id="maincontainer">
                <section id="main">
               @* @if (Model.Messages != null)
        {
            <div id="messages">
                @Zone(Model.Messages)
            </div>
        }*@
                    @Zone(Model.Content)
                        </section>
            </div>
@* </div>*@
        }
        @if (Model.AfterContent != null)
        {
            <div id="after-content">
                @Zone(Model.AfterContent)
            </div>
        }
    </div>
</div>
@if (Model.Navigation != null)
{
@*<div id="menu">
        @Zone(Model.Navigation)
    </div>*@
}
</div>
<div id="footercontainer">
    <footer>
<table id="tb" style="padding-top: 20px">
    <colgroup>
        <col width="200px" />
        <col width="100px" />
        <col width="200px" />
        <col width="250px" />
    </colgroup>
    <tr>
        <td style="font-size: 25px">
            @Html.ActionLink("Vietnamicare.org", " ", " ")
        </td>
        <td style="font-size: 16px">
            Chuyên mục
        </td>
        <td style="font-size: 16px">
            Thông tin
        </td>
        <td style="font-size: 16px">
            Kết nối với vietnamicare
        </td>
    </tr>
    <tr>
        <td rowspan='3'>
            Công cụ truyền cảm hứng, kêt nối mỗi người việt nam vì một Việt Nam hạnh phúc
        </td>
        <td>
            @Html.ActionLink("Thiện nguyện", " ", " ")
        </td>
        <td>
            @Html.ActionLink("Về viêtnamicare", " ", " ")
        </td>
        <td>
            @Html.ActionLink("Blog", " ", " ")
        </td>
    </tr>
    <tr>
        <td>
            @Html.ActionLink("Môi trường", " ", " ")
        </td>
        <td>
            @Html.ActionLink("Nhóm thực hiện", " ", " ")
        </td>
        <td>
            @Html.ActionLink("Facebook", " ", " ")
        </td>
    </tr>
    <tr>
        <td>
            @Html.ActionLink("Giáo dục", " ", " ")
        </td>
        <td>
        </td>
        <td>
            @Html.ActionLink("Youtube", " ", " ")
        </td>
    </tr>
    <tr>
        <td>
        </td>
        <td>
            @Html.ActionLink("Nghệ thuật", " ", " ")
        </td>
        <td>
            Nhận thông tin hàng tuần
        </td>
        <td>
        </td>
    </tr>
    <tr>
        <td>
        </td>
        <td>
            @Html.ActionLink("Năng lượng", " ", " ")
        </td>
        <td>
        </td>
        <td>
        </td>
    </tr>
    <tr>
        <td rowspan='2'>
            <button name="button" value="" class="btnSubmit">
                Hành động ngay</button>
        </td>
        <td>
            @Html.ActionLink("Kinh doanh", " ", " ")
        </td>
        <td rowspan='2'>
            <input type="text" class="txtSearch" placeholder="Email của bạn" style="font-style: italic;
                font-size: 13px;" />
            <button>
                    Gửi</button>
        </td>
    </tr>
    <tr>
        <td>
            @Html.ActionLink("Cộng đồng", " ", " ")
        </td>
    </tr>
</table>
<hr />
<div style="float: right; color: White">
    @Html.ActionLink("Giúp đỡ", " ", " ") |
    @Html.ActionLink("Hướng dẫn", " ", " ") |
    @Html.ActionLink("Liên hệ", " ", " ") |
    @Html.ActionLink("Điều khoản hoạt động", " ", " ") |
    @Html.ActionLink("Bảo mật", " ", " ")
    @Html.ActionLink("@2013 vietnamicare", " ", " ")
</div>
@Zone(Model.Footer)
</footer>
</div>
@using (Script.Foot())
{
    <script type="text/javascript">

        var confirmRemoveMessage = '@T("Are you sure you want to remove this element ?")';

    </script>
}
@*<p> @WorkContext.Resolve<IOrchardServices>()</p>*@ 